package com.wzw.springboot.principle.mvc.message;

import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpOutputMessage;

import java.io.IOException;
import java.io.OutputStream;

/**
 * @author Wangzhiwen
 */
public class CustomizedHttpOutputMessage implements HttpOutputMessage {

    private final HttpOutputMessage httpOutputMessage;

    public CustomizedHttpOutputMessage(HttpOutputMessage httpOutputMessage) {
        this.httpOutputMessage = httpOutputMessage;
    }

    @Override
    public OutputStream getBody() throws IOException {
        return httpOutputMessage.getBody();
    }

    @Override
    public HttpHeaders getHeaders() {
        return httpOutputMessage.getHeaders();
    }
}
